package com.silverhaze.diamond.server.util;

import com.silverhaze.commons.db.datasource.ObjectEntity;

import javax.persistence.EntityManager;

/**
 * This code is part of Kg.Axion project. Treat it as strictly confidential.
 * Created by Ivan Babanin.
 * Creation date: 02.10.11 2:55
 */
public abstract class Trigger<T extends ObjectEntity> {
    public void prePersist(T value, EntityManager entityManager) {
    }

    public void postPersist(T value, EntityManager entityManager) {
    }

    public void preUpdate(T value, EntityManager entityManager) {
    }

    public void postUpdate(T value, EntityManager entityManager) {
    }

    public void preDelete(T value, EntityManager entityManager) {
    }

    public void postDelete(T value, EntityManager entityManager) {
    }
}
